﻿<%@ Page Title="" Language="C#" MasterPageFile="~/Setting.master" AutoEventWireup="true" CodeFile="Employees.aspx.cs" Inherits="Setting_Employees" %>

<asp:Content ID="Content1" ContentPlaceHolderID="SettingHeader" Runat="Server">
     <style type="text/css">
         #searchBar{ padding:10px 0px 5px 0px;}
         #btnBar{ padding:10px 10px; margin:auto; }
         #tableDiv{ margin:auto;}
     </style>
     <script type="text/javascript">
         $(function () {
             $('.commonTable tr').hover(function () {
                 $(this).css('background-color', '#ffffae');
             },
            function () {
                $(this).css('background-color', '#FFFFFF');
            });
         });

         function addEmpl() {
            window.open('add_employee.aspx', '', 'width=600px,height=500px,scrollbars=1,resizable=no,left=' + (screen.availWidth - 600) / 2 + ',top=' + (screen.availHeight - 500) / 2);
           }
           function editEmpl(id) {
           	window.open('add_employee.aspx?id=' +id, '', 'width=600px,height=500px,scrollbars=1,resizable=no,left=' + (screen.availWidth - 600) / 2 + ',top=' + (screen.availHeight - 500) / 2);
           }
        function delEmpl(id) {
            if(confirm('确定删除?'))
                window.location = "employees.aspx?delID=" + id;
        }
        function GoPage(n) {
        	window.location = "employees.aspx?key=<%=key %>&p=" + n;
        }
        function doSearch() {
        	window.location = "employees.aspx?key=" + $("#searchText").val();
		}
    </script>
</asp:Content>
<asp:Content ID="Content2" ContentPlaceHolderID="SettingContent" Runat="Server">
<div class="navTitle"><a href="#">系统设置</a> > 人员</div>
<div id="searchBar"><input type="text" id="searchText" name="searchText" value="<%=key %>" /><input type="button" value="查找" onclick="doSearch()" /></div>
<div id="tableDiv">
    <table class="commonTable" cellspacing="0" cellpadding="5" >
	    <tr>
		    <th>姓名</th>
		    <th>部门</th>
            <th>职位</th>
		    <th>电话</th>
		    <th>手机</th>
		    <th>Email</th>
		    <th>用户名</th>
		    <th>
		    </th>
	    </tr>
        <% WriteTableData();%>
	</table>
	<div class="gridPager">
		<%WriteTablePager(); %>
	</div>
    <div id="btnBar"><input type="button" value="添加人员" onclick="addEmpl()" /></div>
</div>
</asp:Content>

